﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// 文件名：ClsPropertyDAL.cs
/// 作  者：黄纲
/// 时  间：2006.11.1
/// 说  明：ClsPropertyDAL类用于设置或获取Session属性信息
/// </summary>
public class ClsPropertyDAL : System.Web.UI.Page
{
    /// <summary>
    /// 设置或获取用户帐号信息
    /// </summary>
    public string SetOrGetUserID
    {
        get
        {
            if (Session["SetOrGetUserID"] != null)
            {
                return (string)Session["SetOrGetUserID"];
            }
            else
            {
                return "";
            }
        }
        set
        {
            Session["SetOrGetUserID"] = value;
        }
    }

    /// <summary>
    /// 设置或获取当前页数
    /// </summary>
    public int SetOrGetCurrPageID
    {
        get
        {
            if (Session["SetOrGetCurrPageID"] != null)
            {
                return Int32.Parse(Session["SetOrGetCurrPageID"].ToString());
            }
            else
            {
                return 0;
            }
        }
        set
        {
            Session["SetOrGetCurrPageID"] = value;
        }
    }

    /// <summary>
    /// 设置或获取数据集的类型
    /// </summary>
    public int SetOrGetDataSetType
    {
        get
        {
            if (Session["SetOrGetDataSetType"] != null)
            {
                return Int32.Parse(Session["SetOrGetDataSetType"].ToString());
            }
            else
            {
                return 0;
            }
        }
        set
        {
            Session["SetOrGetDataSetType"] = value;
        }
    }

    /// <summary>
    /// 设置或获取从表中的DataGrid控件
    /// </summary>
    public DataGrid SetOrGetChildDataGridControl
    {
        get
        {
            if (Session["SetOrGetChildDataGridControl"] != null)
            {
                return (DataGrid)Session["SetOrGetChildDataGridControl"];
            }
            else
            {
                return null;
            }
        }
        set
        {
            Session["SetOrGetChildDataGridControl"] = value;
        }
    }

    /// <summary>
    /// 设置或获取企业信息数据集
    /// </summary>
    public DataSet SetOrGetCorporationDataSet
    {
        get
        {
            if (Session["SetOrGetCorporationDataSet"] != null)
            {
                return (DataSet)Session["SetOrGetCorporationDataSet"];
            }
            else
            {
                return null;
            }
        }
        set
        {
            Session["SetOrGetCorporationDataSet"] = value;
        }
    }

    /// <summary>
    /// 设置或获取从表查询数据集
    /// </summary>
    public DataSet SetOrGetChildResultDataSet
    {
        get
        {
            if (Session["SetOrGetChildResultDataSet"] != null)
            {
                return (DataSet)Session["SetOrGetChildResultDataSet"];
            }
            else
            {
                return null;
            }
        }
        set
        {
            Session["SetOrGetChildResultDataSet"] = value;
        }
    }

    /// <summary>
    /// 设置或获取查询数据集
    /// </summary>
    public DataSet SetOrGetQueryDataSet
    {
        get
        {
            if (Session["SetOrGetQueryDataSet"] != null)
            {
                return (DataSet)Session["SetOrGetQueryDataSet"];
            }
            else
            {
                return null;
            }
        }
        set
        {
            Session["SetOrGetQueryDataSet"] = value;
        }
    }
}
